<?php
	/*
	 * database.php
	 * 
	 * This file contains all the necessary functions for accessing the Database
	 * @author sar3th
	 * @package blorum
	 */

	/*
	 * include our configuration
	 */
	include_once "configuration.php";
	
	/*
	 * check if we have a database module for our database type
	 */ 
	if(file_exists("includes/databases/" . $DBconf["type"] . ".php"))
	{
		/*
		 * include the database module
		 */
		include_once("includes/databases/" . $DBconf["type"] . ".php");		
	}
	else
	{
		/*
		 * database module not found, print an error message
		 */
		die("ERROR: Database module not found: " . $DBconf["type"]);
	}
?>